package com.bnd.service;

import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;

import java.util.concurrent.CompletableFuture;

/**
 * 流式对话句柄：包含SSE连接与文本完成信号
 */
public class StreamChatHandle {
    private final SseEmitter emitter;
    private final CompletableFuture<String> textDoneFuture;

    public StreamChatHandle(SseEmitter emitter, CompletableFuture<String> textDoneFuture) {
        this.emitter = emitter;
        this.textDoneFuture = textDoneFuture;
    }

    public SseEmitter getEmitter() {
        return emitter;
    }

    public CompletableFuture<String> getTextDoneFuture() {
        return textDoneFuture;
    }
}


